package com.hq.modeapp.bean;

import java.util.ArrayList;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import com.tgb.lk.ahibernate.annotation.Column;
import com.tgb.lk.ahibernate.annotation.Id;
import com.tgb.lk.ahibernate.annotation.Table;
import com.tgb.lk.demo.annotation.PrimaryKey;


import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;


/**
 * @description �������:����ͼƬ�б�
 * @version 1.0
 * @author DonghuiWu 
 * @update 2012-11-17 ����9:13:06
 */
@Table(name = "Photo_List_Bean")
public class Photo_List_Bean {
	@Id
	@Column(name = "id")
	private int id; // ���,int����,��ݿ⽨��ʱ���ֶλ���Ϊ����
	
	@PrimaryKey
	@Column(name = "Photo_List_Bean_id", type = "INTEGER")
	private int Photo_List_Bean_id=-1; // ����һ������ֵ,��type = "INTEGER"�淶һ�°�.
	
	@Column(name = "desc",type = "STRING")
	private String desc;
	@Column(name = "pvnum",type = "STRING")
	private String pvnum;
	@Column(name = "scover",type = "STRING")
	private String scover;
	@Column(name = "setname",type = "STRING")
	private String setname;
	@Column(name = "cover",type = "STRING")
	private String cover;
	@Column(name = "clientcover1",type = "STRING")
	private String clientcover1;
	@Column(name = "replynum",type = "STRING")
	private String replynum;
	//ID
	@Column(name = "setid",type = "STRING")
	private String setid;
	@Column(name = "topicname",type = "STRING")
	private String topicname;
	@Column(name = "seturl",type = "STRING")
	private String seturl;
	//http://img3.cache.netease.com/photo/0096/2012-11-19/400x400_8GLO347K54GI0096.jpg
	@Column(name = "clientcover",type = "STRING")
	private String clientcover;
	//2012-11-19 09:14:56
	@Column(name = "datetime",type = "STRING")
	private String datetime;
	//��Ƭ������
	@Column(name = "imgsum",type = "STRING")
	private String imgsum;
	@Column(name = "tcover",type = "STRING")
	private String tcover;
	
	public Photo_List_Bean() {
		super();
	}

	
	public String getDesc() {
		return desc;
	}


	public void setDesc(String desc) {
		this.desc = desc;
	}


	public String getPvnum() {
		return pvnum;
	}


	public void setPvnum(String pvnum) {
		this.pvnum = pvnum;
	}


	public String getScover() {
		return scover;
	}


	public void setScover(String scover) {
		this.scover = scover;
	}


	public String getSetname() {
		return setname;
	}


	public void setSetname(String setname) {
		this.setname = setname;
	}


	public String getCover() {
		return cover;
	}


	public void setCover(String cover) {
		this.cover = cover;
	}


	public String getClientcover1() {
		return clientcover1;
	}


	public void setClientcover1(String clientcover1) {
		this.clientcover1 = clientcover1;
	}


	public String getReplynum() {
		return replynum;
	}


	public void setReplynum(String replynum) {
		this.replynum = replynum;
	}


	public String getSetid() {
		return setid;
	}


	public void setSetid(String setid) {
		this.setid = setid;
	}


	public String getTopicname() {
		return topicname;
	}


	public void setTopicname(String topicname) {
		this.topicname = topicname;
	}


	public String getSeturl() {
		return seturl;
	}


	public void setSeturl(String seturl) {
		this.seturl = seturl;
	}


	public String getClientcover() {
		return clientcover;
	}


	public void setClientcover(String clientcover) {
		this.clientcover = clientcover;
	}


	public String getDatetime() {
		return datetime;
	}


	public void setDatetime(String datetime) {
		this.datetime = datetime;
	}


	public String getImgsum() {
		return imgsum;
	}


	public void setImgsum(String imgsum) {
		this.imgsum = imgsum;
	}


	public String getTcover() {
		return tcover;
	}


	public void setTcover(String tcover) {
		this.tcover = tcover;
	}


	public static ArrayList<Photo_List_Bean> parseJson(String str) {
		ArrayList<Photo_List_Bean> list = new ArrayList<Photo_List_Bean>();
		try {
			JSONArray jsonArray;
			jsonArray = new JSONArray(str);
			int n = jsonArray.length();
			for (int i = 0; i < n; i++) {
				Photo_List_Bean bean = new Photo_List_Bean();
				bean.setDesc(jsonArray.getJSONObject(i).getString("desc"));
				bean.setPvnum(jsonArray.getJSONObject(i).getString("pvnum"));
				bean.setSetname(jsonArray.getJSONObject(i).getString("setname"));
				bean.setCover(jsonArray.getJSONObject(i).getString("cover"));
				bean.setClientcover1(jsonArray.getJSONObject(i).getString("clientcover1"));
				bean.setReplynum(jsonArray.getJSONObject(i).getString("replynum"));
				bean.setTopicname(jsonArray.getJSONObject(i).getString("topicname"));
				bean.setSetid(jsonArray.getJSONObject(i).getString("setid"));
				bean.setSeturl(jsonArray.getJSONObject(i).getString("seturl"));
				bean.setClientcover(jsonArray.getJSONObject(i).getString("clientcover"));
				bean.setDatetime(jsonArray.getJSONObject(i).getString("datetime"));
				bean.setTcover(jsonArray.getJSONObject(i).getString("tcover"));
				bean.setImgsum(jsonArray.getJSONObject(i).getString("imgsum"));
				list.add(bean);
			}
		} catch (JSONException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return list;

	}
	
	
	
	
	
}
